package com.wmyg.scanninggun.service.impl;

import com.wmyg.scanninggun.bean.Factory;
import com.wmyg.scanninggun.dao.FactoryMapper;
import com.wmyg.scanninggun.service.FactoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("factoryService")
public class FactoryServiceImpl implements FactoryService {

    @Autowired
    private FactoryMapper factoryMapper;

    @Override
    public int delete(int id) {
        return 0;
    }

    @Override
    public int insert(Factory factory) {
        return factoryMapper.insert(factory);
    }

    @Override
    public int update(Factory factory) {
        return factoryMapper.update(factory);
    }

    @Override
    public Factory selectById(Integer factoryId) {
        return factoryMapper.view(factoryId);
    }

    @Override
    public List<Factory> findAll() {
        return factoryMapper.findAll();
    }

}
